﻿<%@ Page Title="配送排名" Language="C#" MasterPageFile="~/Master/MasterPage_New.master"
    AutoEventWireup="true" CodeBehind="ProcureCompanyPS.aspx.cs" Inherits="HZ.Supervise.Web.Secondphase.ProcureCompanyPS" %>

<%@ Register Src="~/Common/QueryControl.ascx" TagName="QueryControl" TagPrefix="uc1" %>
<%@ Register Src="../Common/ChartControl.ascx" TagName="ChartControl" TagPrefix="uc2" %>
<%@ Register Src="../Common/MaxforMonth.ascx" TagName="MaxforMonth" TagPrefix="uc3" %>
<%@ Register Src="../Common/AreaControls.ascx" TagName="AreaControls" TagPrefix="uc4" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">

    <script type="text/javascript">

		//        //add by 曹鹏 2011年4月27日12:20:21 隐藏菜单项
		//        var frameSet2 = top.document.getElementById("mainFrame");
		//        frameSet2.cols = "0,0,*";

		////        var frameBar2 = top.document.getElementById("bar2"); 
		////        frameBar2.src = "";

		function disTime(a) {
			document.getElementById("ctl00_ContentPlaceHolder1_hidTime").value = a;

		}
		function Load() {
			if (document.getElementById("ctl00_ContentPlaceHolder1_hidTime").value == "" || document.getElementById("ctl00_ContentPlaceHolder1_hidTime").value == "rdoTime1") {
				document.getElementById("rdoTime1").checked = true;
			} else {
				document.getElementById("rdoTime2").checked = true;
			}
		}
    </script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div id="tabnav">
        <ul>
            <li style='<%=HZ.Supervise.Web.Function.CheckMenuByUserID("县区排名")%>'><a href="../Secondphase/ReportArea/ProcureArea.aspx">
                县区排名</a></li>
            <li style='<%=HZ.Supervise.Web.Function.CheckMenuByUserID("城市排名")%>'><a href="ReportArea/RankOfCity.aspx">
                城市排名</a></li>
            <li style='<%=HZ.Supervise.Web.Function.CheckMenuByUserID("医院排名")%>'><a href="ProcureHospitalMax.aspx">
                医院排名</a></li>
            <li class="active"><a href="javascript:void(0);">配送排名</a></li>
            <li style='<%=HZ.Supervise.Web.Function.CheckMenuByUserID("药品排名")%>'><a href="ProcureMax.aspx">
                药品排名</a></li>
            <li style='<%=HZ.Supervise.Web.Function.CheckMenuByUserID("医院采购类型所占比例")%>'><a href="SortSourceRate.aspx">
                医院采购类型所占比例</a></li>
            <li style='<%=HZ.Supervise.Web.Function.CheckMenuByUserID("县区采购类型所占比例")%>'><a href="SortSourceRateOfArea.aspx">
                县区采购类型所占比例</a></li>
            <li style='<%=HZ.Supervise.Web.Function.CheckMenuByUserID("城市采购类型所占比例")%>'><a href="SortSourceRateOfCity.aspx">
                城市采购类型所占比例</a></li>
            <li style='<%=HZ.Supervise.Web.Function.CheckMenuByUserID("采购单次数")%>'><a href="SortSourceRateCount.aspx">
                采购单次数</a></li>
        </ul>
    </div>
    <div id="tabcontent2">
        <table class="querylist">
            <tr>
                <td>
                    <table class="querylist">
                        <tr>
                            <td align="right">
                                企业名称：
                            </td>
                            <td align="left">
                                <asp:TextBox runat="server" ID="txtCompanynamePs" Height="13px"></asp:TextBox>
                            </td>
                            <td align="right" colspan="1">
                                采购类型：
                            </td>
                            <td align="left">
                                <asp:DropDownList ID="dropMort" runat="server">
                                    <asp:ListItem Value="-1">全部</asp:ListItem>
                                    <asp:ListItem Value="0">日常采购</asp:ListItem>
                                    <asp:ListItem Value="1">临时采购</asp:ListItem>
                                    <asp:ListItem Value="2">应急采购</asp:ListItem>
                                </asp:DropDownList>
                            </td>
                            <td align="right">
                                统计日期：
                            </td>
                            <td align="left">
                                &nbsp;<uc3:MaxforMonth ID="MaxforMonth1" runat="server" />
                                <asp:HiddenField ID="hidTime" runat="server" />
                            </td>
                        </tr>
                        <tr>
                            <td align="right">
                                地区：
                            </td>
                            <td align="left">
                                <uc4:AreaControls ID="AreaControls1" runat="server" />
                            </td>
                            <td align="right">
                                排名方式：
                            </td>
                            <td align="left" colspan="2">
                                <asp:DropDownList ID="ddlorderby" runat="server">
                                    <asp:ListItem Value="PurchaseAmount">采购金额</asp:ListItem>
                                    <asp:ListItem Value="DistributeAmount" Selected="True">配送金额</asp:ListItem>
                                    <asp:ListItem Value="WareHouseAmount">入库金额</asp:ListItem>
                                    <asp:ListItem Value="DistributeRate">配送率</asp:ListItem>
                                    <asp:ListItem Value="WareHouseRate">入库率</asp:ListItem>
                                </asp:DropDownList>
                                <asp:DropDownList ID="dllorder" runat="server">
                                    <asp:ListItem Value="desc">降序</asp:ListItem>
                                    <asp:ListItem Value="asc">升序</asp:ListItem>
                                </asp:DropDownList>
                            </td>
                        </tr>
                        <asp:Literal runat="server" ID="ltlAdvance" Text="&lt;tbody id='advance' style='display:none'&gt;"></asp:Literal>
                    </table>
                </td>
                <td width="130px">
                    <asp:Button ID="btnQuery" runat="server" Text="查  询" OnClick="btnQuery_Click" CssClass="btn"
                        SkinID="search" ToolTip="点击查询符合条件的数据" />
                </td>
            </tr>
        </table>
    </div>
    <asp:GridView ID="gvwProcureCatalog" runat="server" CssClass="mainlist" AutoGenerateColumns="False"
        EmptyDataText="暂无符合条件的数据！">
        <Columns>
            <asp:BoundField DataField="CompanyName" HeaderText="企业名称" ReadOnly="true" />
            <%-- <asp:TemplateField HeaderText="采购类型">
                <ItemTemplate>
                    <%#HZ.Supervise.Web.Function.FormatDrugSource(Eval("SortSource"))%>
                </ItemTemplate>
                <HeaderStyle Width="60px" />
            </asp:TemplateField>--%>
            <asp:BoundField HeaderText="采购类型" DataField="addDataColumn" />
            <asp:BoundField HeaderText="采购金额" DataField="PurchaseAmountTotal" />
            <asp:BoundField HeaderText="配送金额" DataField="DistributeAmountTotal" />
            <asp:BoundField HeaderText="配送率" DataField="addDistributeRate" />
            <asp:BoundField HeaderText="入库金额" DataField="WarehouseAmountTotal" />
            <asp:BoundField HeaderText="入库率" DataField="addWarehouseRate" />
            <asp:BoundField DataField="pm" HeaderText="本月排名" ReadOnly="true" />
            <asp:BoundField DataField="addColumnOfRank" HeaderText="上月排名" ReadOnly="true" />
            <asp:TemplateField HeaderText="名次变化">
                <ItemTemplate>
                    <img src='<%# HZ.Supervise.Web.Function.GetImageurl( Convert.ToInt32(Eval("pms").ToString()==""?Int32.MaxValue.ToString():Eval("pms").ToString())-Convert.ToInt32(Eval("pm").ToString())) %>' />
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
    </asp:GridView>
    <asp:GridView ID="gvwProcureCatalog2" runat="server" CssClass="mainlist" AutoGenerateColumns="False">
        <Columns>
            <asp:BoundField DataField="CompanyName" HeaderText="企业名称" ReadOnly="true" />
            <%--            <asp:TemplateField HeaderText="采购类型">
                <ItemTemplate>
                    <%#HZ.Supervise.Web.Function.FormatDrugSource(Eval("SortSource"))%>
                </ItemTemplate>
                <HeaderStyle Width="60px" />
            </asp:TemplateField>--%>
            <asp:BoundField DataField="addDataColumn" HeaderText="采购类型" />
            <asp:BoundField HeaderText="采购金额" DataField="PurchaseAmountTotal" />
            <asp:BoundField HeaderText="配送金额" DataField="DistributeAmountTotal" />
            <asp:BoundField HeaderText="入库金额" DataField="WarehouseAmountTotal" />
            <asp:BoundField HeaderText="配送率" DataField="addDistributeRate" />
            <asp:BoundField HeaderText="入库率" DataField="addWarehouseRate" />
            <asp:BoundField DataField="apm" HeaderText="排名" ReadOnly="true" />
        </Columns>
    </asp:GridView>
    <div>
        <span style="float: left; width: 30%">
            <hz:HzButton ID="btnExcel" runat="server" CssClass="btn" Text="导出数据" OnClick="btnExcel_Click" /></span><span
                style="float: right; width: 70%">
                <webdiyer:AspNetPager ID="AspNetPager1" runat="server" OnPageChanged="AspNetPager1_PageChanged"
                    AlwaysShow="True" ShowPageSizeBox="True">
                </webdiyer:AspNetPager>
            </span>
    </div>
    <%--&nbsp;统计：<asp:Label ID="lblCount" runat="server"></asp:Label>--%>
    <div class="listip">
        <ul>
            <%--<asp:LinkButton ID="lbtnSee" runat="server" OnClick="lbtnSee_Click" Font-Size="Small"
                Visible="false">显示图表</asp:LinkButton>--%>
            <%--<uc2:ChartControl ID="ChartControl1" runat="server" Visible="False" />--%>
            <li>说明:1.<span>此数据是静态数据，每24小时统计一次。</span> </li>
            <li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2.<span>配送率计算方式为：配送金额/采购金额；入库率计算方式为：入库金额/采购金额。</span>
            </li>
        </ul>
    </div>
</asp:Content>
